@import '~antd/es/style/themes/default.less';

html,
body,
#root {
  height: 100%;
  // 变成灰色
  //-webkit-filter: grayscale(.95);
}

.colorWeak {
  filter: invert(80%);
}

.ant-layout {
  min-height: 100vh;
}

.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
  left: unset;
}

canvas {
  display: block;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ul,
ol {
  list-style: none;
}

// 菜单图标
.ant-pro-menu-item {
  display: flex;
  align-items: center;

  img {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: @screen-xs) {
  .ant-table {
    width: 100%;
    overflow-x: auto;

    &-thead > tr,
    &-tbody > tr {
      > th,
      > td {
        white-space: pre;

        > span {
          display: block;
        }
      }
    }
  }
}

// Compatible with IE11
@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) {
  body .ant-design-pro > .ant-layout {
    min-height: 100vh;
  }
}

.ant-pro-top-nav-header-logo {
  display: flex;
  justify-content: center;
}

.ant-form-item-required {
  &::before {
    position: absolute;
    right: -12px;
  }
}

.ant-formily-item-label-content {
  position: relative;
  padding-bottom: 8px;
  overflow: unset;

  .ant-formily-item-asterisk {
    float: right;
    margin-right: 0;
    //position: absolute;
    //right: -8px;
  }
}

.ant-formily-item-colon {
  display: none;
}

.ant-formily-item-label-tooltip-icon {
  align-items: flex-start;
  padding-top: 5px;
}

.ant-page-header-heading {
  display: none;
}

.page-title-show {
  .ant-page-header-heading {
    display: flex;
  }
}

.tabs-full-active {
  .ant-tabs-tab-active {
    background-color: @primary-1;
  }
}

.ellipsis {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
  text-overflow: ellipsis;
}

.ellipsisFn(@num: 1, @width: 100%) {
  display: -webkit-box;
  max-width: @width;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: @num;
}

.ellipsis-70 {
  width: 70%;
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
  text-overflow: ellipsis;
}

// fuck chrome
input[type='text'],
input[type='password'],
input[type='number'],
input[type='tel'] {
  &:not([disabled]) {
    box-shadow: inset 0 0 0 100vw white !important;
  }
}

//引导遮罩
#driver-page-overlay {
  opacity: 0.35 !important;
}

.ant-pagination-mini .ant-pagination-jump-prev,
.ant-pagination-mini .ant-pagination-jump-next {
  display: none;
}

.ant-popover-buttons {
  display: flex;
  justify-content: flex-end;
}

.ant-formily-array-table
  .ant-table
  td
  .ant-formily-item:not(.ant-formily-item-feedback-layout-popover)
  .ant-formily-item-help {
  position: inherit;
  top: 100%;
  z-index: 1;
  width: 100%;
  margin-top: 3px;
  padding: 3px;
  font-size: 12px;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 0 10px #eee;
  transform: translateY(0);
  opacity: 1;
  animation: none;
}
